package com.web.dao;

import com.web.entity.User;
import com.web.mapper.UserMapper;
import com.web.util.DBUtil;


/**
 * user表数据层
 */
public class UserDao {

    /**
     * 根据用户名查询用户方法
     * @param username
     * @return
     */
    public User get(String username){
        return (User) DBUtil.queryForObject("select * from user where username=?",new UserMapper(),username);
    }

}
